<style>
    .fieldlist dd input:first-child {
        width: 200px;
    }
    </style>
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">角色:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select id="c-group" data-rule="required" class="form-control selectpicker" name="row[group]">-->
<!--                {foreach name="groupList" item="vo"}-->
<!--                <option value="{$vo.id}" >{$vo.name}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group', $groupdata, null, ['class'=>'form-control selectpicker',  'data-rule'=>'required'])}
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('人员组')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-admingroup_ids" data-multiple="true" "  min="0"  data-source="auth/admingroup/index" class="form-control selectpage" name="admingroup_ids" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">姓名:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">手机号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="id_card" class="control-label col-xs-12 col-sm-2">身份证号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="id_card" name="row[id_card]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">账号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="required" />
        </div>
    </div>
<!--    <div class="form-group teacher" style="display: none">-->
<!--        <label class="control-label col-xs-12 col-sm-2">主科:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select id="c-major" class="form-control selectpicker" name="row[major]">-->
<!--                <option value="0" >请选择</option>-->
<!--                {foreach name="subject_list" item="vo"}-->
<!--                <option value="{$vo.id}" >{$vo.name}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group teacher" style="display: none">-->
<!--        <label class="control-label col-xs-12 col-sm-2">科任:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select id="c-f_major"  class="form-control selectpicker" multiple="true" name="row[f_major][]">-->
<!--                {foreach name="subject_list" item="vo"}-->
<!--                <option value="{$vo.id}" >{$vo.name}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group " >
        <label class="control-label col-xs-12 col-sm-2">年级组:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-grade_group" class="form-control selectpicker" name="row[grade_group]">
                <option value="0" >请选择</option>
                {foreach name="grade_group_list" item="vo"}
                <option value="{$vo.id}" >{$vo.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否参与课时计算')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[lesson_count]', ['1'=>__('是'), '0'=>__('否')])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('电子签章')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-signature" class="form-control" size="50" name="row[signature]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-signature" class="btn btn-danger faupload" data-input-id="c-signature" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-signature"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-signature" class="btn btn-primary fachoose" data-input-id="c-signature" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-signature"></span>
            </div>
            <span class="text-warning">当选择的角色组中含有审核权限，则需要上传电子签章图片</span>
            <ul class="row list-inline faupload-preview" id="p-signature"></ul>
        </div>
    </div>
<!--    <div class="form-group teacher" style="display: none">-->
<!--        <label class="control-label col-xs-12 col-sm-2">所属业务管理员:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select id="c-business_administrator_id"  class="form-control selectpicker" name="row[business_administrator_id]">-->
<!--                <option value="0" >请选择</option>-->
<!--                {foreach name="$business_administrator_list" item="vo"}-->
<!--                <option value="{$vo.id}" >{$vo.nickname}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group teacher" style="display: none">-->
<!--        <label class="control-label col-xs-12 col-sm-2" >所属人事管理员:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select id="c-personnel_manager_id"  class="form-control selectpicker" name="row[personnel_manager_id]">-->
<!--                <option value="0" >请选择</option>-->
<!--                {foreach name="personnel_manager_list" item="vo"}-->
<!--                <option value="{$vo.id}" >{$vo.nickname}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">自定义工资基准项:</label>
        <div class="col-xs-12 col-sm-8">
            <a href="javascript:;" data-area='["80%", "80%"]' id="select_salary" class="btn btn-info select">请选择自定义工资基准项</a>
        </div>
        </div>


    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="box" style="display: none">
                <div class="box-header with-border">
                    <h3 class="box-title">自定义基准项组</h3>
                </div>
                <div class="box-body">
                    <table class="table table-bordered" id="benchmark-table">
                        <thead>
                        <tr>
                            <th>自定义基准项</th>
                            <th>单选项</th>
                            <th>费用</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[salary_benchmark_item_id]" value="[]">
            <button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>

<script type="text/html" id="tr-tpl">
    <tr data-id="__id__">
        <td>__title__</td>
        <td>__name__</td>
        <td>__price__</td>
        <td><a href="javascript:void(0)" data-operate="remove" class="btn btn-sm btn-warning">移除</a></td>
    </tr>
</script>